<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    >
  <!--Style for the group box of the ribbon. The group box appears as a sub-level of the tabs and groups the ribbon buttons.-->
  <Style TargetType="{x:Type GroupBox}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Margin" Value="2"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GroupBox}">
          <Border 
                Background="{StaticResource NormalBackgroundBrush}"
                BorderBrush="{StaticResource GroupBoxOuterBorderBrush}" 
                BorderThickness="1" 
                CornerRadius="3"
                SnapsToDevicePixels="True">
            <Grid>
              <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
              </Grid.RowDefinitions>
              <Border 
                BorderBrush="{StaticResource GroupBoxInnerBorderBrush}" 
                BorderThickness="1,1,0,0" 
                CornerRadius="3,3,0,0"
                Margin="1"
                SnapsToDevicePixels="True">
                <ContentPresenter Margin="2" ContentSource="Content"/>
              </Border>
              <Border 
                Grid.Row="1" 
                Background="#C1D9F1" 
                BorderThickness="1,0,1,1"
                CornerRadius="0,0,3,3"
                Margin="-1"
                SnapsToDevicePixels="True"
                Name="HeaderBorder">
                <ContentPresenter 
                    Margin="2"
                    HorizontalAlignment="Center" 
                    VerticalAlignment="Center" 
                    ContentSource="Header" 
                    Name="PART_HeaderSite" 
                    RecognizesAccessKey="True"
                    TextElement.Foreground="{StaticResource NormalForegroundBrush}"/>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Background" TargetName="HeaderBorder" Value="{StaticResource GroupBoxHighlightBackgroundBrush}"/>
              <Setter Property="TextElement.Foreground" TargetName="PART_HeaderSite" Value="{StaticResource GroupBoxHighlightForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>